﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace SF.Ucenter.door
{
    public partial class index : System.Web.UI.Page
    {
        protected string activePicStr="";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                loadData();
            }
        }

        /// <summary>
        /// 绑定活动页面
        /// </summary>
        private void loadData()
        {
            string bgs = "<ul class='list-span fn-clear'>",imgs="<div id='loading' style='text-align: center; width: 100%; height: 520px; line-height: 520px; font-size: 36px; margin-top: -520px; display: none;'><img src='imgs/loading.gif' alt='Loading' retina='true' height='32' width='32' /></div><div class='list-cont fn-clear'>";
            BLL.sf_door_index_pics indexBll = new BLL.sf_door_index_pics();
            DataTable dt = indexBll.GetList(" classNum='1' and isDelete=0 ").Tables[0];
            foreach (DataRow r in dt.Rows)
            {
                bgs += "<li class='banner-img' style='display: none;'><img class='loadimg' src='" + r["pics"] + "' alt='" + r["name"] + "' height='519' width='1900' /></li>";
                string remark = r["remarks"].ToString().Replace("&lt;", "<").Replace("&gt;", ">");
                imgs += "<div class='list-info'><div style='left: -600px; opacity: 0; display: none;' class='banner-word banner-word-init'><p>" + remark + "</p></div><img class='banner-phone-init banner-phone' src='" + r["imgs"] + "' alt='" + r["name"] + "' retina='true' style='top: 30%; right: -363px; opacity: 0; display: none;' height='640' width='303' /></div>";
            }
            bgs += "</ul>";
            imgs += "<span id='pre' class='carouse-pre' retina='true'>&lt;&lt;</span><span id='next' class='carouse-next' retina='true'>&gt;&gt;</span><div id='carouse-btn' class='carouse-btn' retina='true'><span id='cur-ic' class='cur-img'><a href='#'>1</a></span><span id=''><a href='#'>2</a></span><span id=''><a href='#'>3</a></span><span id=''><a href='#'>4</a></span></div></div>";
            activePicStr = bgs + imgs;
        }
    }
}